import { createApp } from 'vue'
import App from './App.vue'
const app = createApp(App)


// 全局导入element-puls
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
app.use(ElementPlus)

// 全局导入路由
import { router } from '~/router'
app.use(router)

// 全局导入store
import store from '~/store'
app.use(store)

// 导入element图标
import * as icons from '@element-plus/icons-vue'
Object.keys(icons).forEach(key => {
    app.component(key, icons[key])
})

// 导入全局进度条
import 'nprogress/nprogress.css'
import '~/permission.js'

// 导入自定义指令v-permission
import permission from '~/directive/permission.js'
app.use(permission)

app.mount('#app')
